From 8c083820fda56b5c3147a41f0f609181b8982a1a Mon Sep 17 00:00:00 2001 From: Christian Limpach Date: Thu, 10 May 2007 15:02:05 +0100 Subject: [PATCH] [qemu] Use qemu's -vnc option to specify the interface to listen on. Domain config files still use the original syntax with vnc and vnclisten. Signed-off-by: Christian Limpach --- tools/python/xen/xend/image.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index bec78012e0..361c420c48 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -387,18 +387,14 @@ class HVMImageHandler(ImageHandler): if key in vmConfig['platform']: vnc_config[key] = vmConfig['platform'][key] - if not vnc_config.get('vncunused', 0) and \ - vnc_config.get('vncdisplay', 0): - vncdisplay = vnc_config.get('vncdisplay') - ret.append('-vnc') - ret.append(str(vncdisplay)) - else: - ret.append('-vncunused') - vnclisten = vnc_config.get('vnclisten', xenopts().get_vnclisten_address()) - ret.append('-vnclisten') - ret.append(str(vnclisten)) + vncdisplay = vnc_config.get('vncdisplay', 0) + ret.append('-vnc') + ret.append("%s:%d" % (vnclisten, vncdisplay)) + + if vnc_config.get('vncunused', 0): + ret.append('-vncunused') # Store vncpassword in xenstore vncpasswd = vnc_config.get('vncpasswd') -- 2.30.2